import flask
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker

username="root"
password='656494343'
host='localhost'
port="3306"
database='flaskdb'

mysql_engine = create_engine(url=f'mysql://{username}:{password}@{host}:{port}/{database}',echo= True)
Base = declarative_base()

Session = sessionmaker(bind=mysql_engine)

def create_app():
    app = flask.Flask(__name__)
    # app.config.from_object('config.Config')
    # app.config['SQLALCHEMY_DATABASE_URI'] = ''
    from . import routes
    app.register_blueprint(routes.bp)
    return app